import './assets/main.css';
import { createApp } from 'vue';
import { createPinia } from 'pinia';
import App from './App.vue';
import router from './router';
import { ConfigProvider } from 'vant';
// @ts-ignore
import Avatar from 'vue3-avatar';
import 'vant/lib/index.css';
import Vant from 'vant';
const app = createApp(App);
app.use(ConfigProvider);
app.use(Vant);
app.component('avatar', Avatar);
app.use(createPinia());
app.use(router);

if (import.meta.env.DEV) {
  app.mount('#app');
} else {
  document.addEventListener(
    'deviceready',
    () => {
      app.mount('#app');
    },
    false
  );
}
